<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    .btn {
      height: 60px;
      width: 100px;
      /*border: 2px solid red;*/
      text-align: center;
      line-height: 60px;
      border-radius: 12px;
      position: relative;
      overflow: hidden;
    }

    .btn::before {
      content: '';
      position: absolute;
      width: calc(100% - 4px);
      height: calc(100% - 4px);
      background: deepskyblue;
      left: 2px;
      top: 2px;
      z-index: -1;
      border-radius: 12px;
    }

    .btn::after {
      content: '';
      position: absolute;
      width: 200%;
      height: 200%;
      background-color: #908aef;
      left: 50%;
      top: 50%;
      transform-origin: 0 0;
      animation: ani 3s linear infinite;
      z-index: -2;
    }

    @keyframes ani {
      to {
        transform: rotate(1turn);
      }
    }
  </style>
</head>
<body>
<div class="btn">
  按钮
</div>
</body>
</html>